package com.youmu.maven.emall.Util;

import java.util.List;

public class Page<T> {

	private Integer page;

	private Integer totalPages;

	private Integer pageSize;

	private Integer totalCount;

	private List<T> datas;

	public Page(Integer page, Integer pageSize, Integer totalCount) {
		this.page = page;
		this.pageSize = pageSize;
		this.totalCount = totalCount;
		this.totalPages = (int) Math.ceil((totalCount * 1.0) / pageSize);

	}

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(Integer totalPages) {
		this.totalPages = totalPages;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}

	public List<T> getDatas() {
		return datas;
	}

	public void setDatas(List<T> datas) {
		this.datas = datas;
	}

}
